package com.brillilab.service.module.message.template.impl.reagent;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: PIOperatePrivateReagentTemp
 * @ProjectName brill_lab
 * @Description: 管理员操作了私人试剂(取用 / 归还 / 删除)
 * @date 2019/5/27 17:17
 */
@Data
public class PIOperatePrivateReagentTemp extends AbstractMessageTemplate {
    private String savePath;
    private String reagentName;
    private String PIName;
    private String operatorType;

    /**
     * 管理员操作了私人试剂(取用/归还/删除)
     *
     * @param labId        实验ID
     * @param receiverId   接收人ID
     * @param labMemberId  接收者实验室成员Id
     * @param savePath     试剂存储路径
     * @param reagentName  试剂名称
     * @param PIName       管理员名称
     * @param operatorType 操作类型
     */
    public PIOperatePrivateReagentTemp(Long labId, Long receiverId,Long labMemberId, String savePath, String reagentName, String PIName, String operatorType) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.PIOperatePrivateReagent.getValue());
        super.setTitle("您的私有试剂状态已被管理员更改");
        String content = String.format(
                "您位于<span style='color:#F6AC2D'>%s</span>的" +
                "<span style='color:#F6AC2D'>%s</span>被" + "<span style='color:#F6AC2D'>%s</span> " +
                "<span style='color:#F6AC2D'>%s</span>，" + "<span>如有疑问请联系该管理员。</span>"
                , savePath, reagentName,PIName,operatorType);
        super.setContent(content);
        super.setAppContent(String.format("您位于%s的%s被%s%s如有疑问请联系该管理员", savePath, reagentName,PIName,operatorType));
        this.labMemberId=labMemberId;
        this.savePath = savePath;
        this.reagentName = reagentName;
        this.PIName = PIName;
        this.operatorType = operatorType;
    }

}
